{% load static %}
<!DOCTYPE html>
<html>

<head>
    <title>收件箱</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="{% static 'css/in_box.css' %}">
    <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
</head>

<body style="background-image: url({% static 'img/inbox/背景2.jpg' %});">
    <div class="box">
        <form method="get" action="">
            <div class="top">
                <div class="logo"><img src="{% static 'img/inbox/图层5.png' %}"></div>
                <div class="username" name="post_user_name">{{ request.session.info.user_name }}</div>
                <div class="phonenumber">{{ request.session.info.user_phone_number }}</div>
                <div class="search_input" id="search">
                    <a href="../inbox" class="fa fa-search" id="i-advanced-search-i"></a>
                    <input type="text" id="i-advanced-search" placeholder="作业搜索..." name="search">
                </div>
                <a href="../inbox" class="list_one">收件箱</a>
                <a href="../outbox" class="list_two">发件箱</a>
                <a href="../postwork" class="list_three">提交作业</a>
                <a href="../log_out" class="list_four">退出登录</a>
            </div>
            <div class="foot">
                <div class="bodyfirst">
                    <a href="../all_read" class="button">全部标为已读</a>
                    {% if data_list.has_previous %}
                    <a href="../inbox?page={{ data_list.previous_page_number }}&search={{ search }}" class="button1">上一页</a>
                    {% endif %}
                    {% if data_list.has_next %}
                    <a href="../inbox?page={{ data_list.next_page_number }}&search={{ search }}" class="button2">下一页</a>
                    {% endif %}
                </div>
                <div class="bodysecond">
                    <a href="#">
                        <img class="left" src="{% static 'img/inbox/直线6.png' %}" height="28px" width="2px">
                        <img class="second" src="{% static 'img/inbox/邮箱闭着.png' %}" height="17px" width="25px">
                        <img class="third" src="{% static 'img/inbox/别针.png' %}" height="17px" width="15px">
                        <img class="right" src="{% static 'img/inbox/直线6.png' %}" height="28px" width="2px">
                        <div class="person">发件人</div>
                        <img class="right_" src="{% static 'img/inbox/直线6.png' %}" height="28px" width="2px">
                        <div class="theme">主题</div>
                        <img class="right_1" src="{% static 'img/inbox/直线6.png' %}" height="28px" width="2px">
                        <div class="data">日期</div>
                    </a>


                    {% for data in data_list %}
                    <div class="link-top" style="top: {{ data.number }}px"></div>
                    <a href="../email?email_id={{ data.id }}">
                    {% if data.read %}
                        <img class="second_" src="{% static 'img/inbox/已读拷贝.png' %}" height="17px" width="25px" style="top: {{ data.number_second }}px">
                        {% else %}
                        <img class="second_" src="{% static 'img/inbox/邮箱闭着.png' %}" height="17px" width="25px" style="top: {{ data.number_second }}px">
                    {% endif %}
                        <div class="person_1" style="top: {{ data.number_font }}px">{{ data.post_user_name }}</div>
                        <div class="theme_1" style="top: {{ data.number_font }}px">{{ data.topic }}</div>
                        <div class="data_1" style="top: {{ data.number_font }}px">{{ data.date.year }}年{{ data.date.month }}月{{ data.date.day }}日{{ data.date.hour }}时{{ data.date.minute }}分</div>
                        <a href="../delete?in_out=in&email_id={{ data.id }}" class="delete1" style="top: {{ data.number_delete }}px">删除</a>
                    </a>
                    {% endfor %}

                </div>
            </div>
        </form>
    </div>
</body>
<script src="./js/index.js"></script>
</html>